package com.book.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Date;

/**
 * (TbBook)表实体类
 *
 * @author makejava
 * @since 2024-11-07 19:53:30
 */
@SuppressWarnings("serial")
@Data
@AllArgsConstructor
@TableName(value = "tb_book")
//图书表
public class TbBook extends Model<TbBook> {
    @TableId(type = IdType.AUTO)
    private Integer bookId;
//图书名
    private String bookName;
//图书类型
    private String bookLei;
//图书标签
    private String bookTags;
//书名简介
    private String bookSub1;
//图书内容简介
    private String bookSub2;
//图书封面
    private String bookImg;
//阅读人数
    private String bookReading;
//网购地址
    private String bookOnline;
//图书发布时间
    private Date bookBytime;
//创建时间
    private Date createTime;
//修改时间
    private Date updateTime;

    public TbBook(String bookName, String bookLei, String bookTags, String bookSub2, Date bookBytime) {
        this.bookName = bookName;
        this.bookLei = bookLei;
        this.bookTags = bookTags;
        this.bookSub2 = bookSub2;
        this.bookBytime = bookBytime;
        this.createTime = new Date();
    }
}

